import { createStore } from 'vuex'
import login from './login/login'
import { IRootState } from './type'

const store = createStore<IRootState>({
  state: () => {
    return {
      name: 'Hello Store.',
      age: 18,
      sex: 'man'
    }
  },
  mutations: {
    changeName(state) {
      state.name = "AAA"
    }
  },
  modules: {
    login
  }
})


export default store
